﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;

using $prjsn$.Common.Business.Services.HowTos;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using ProjectBase.Core;
using ProjectBase.Core.Service;
using ProjectBase.Core.Tools.Export;
using ProjectBase.Mvc;

using $prjsn$.Common;
using $prjsn$.Common.Business.Services;
using $prjsn$.Entity.Services;

namespace $safeprojectname$.Tools
{
    /// <summary>
    /// Basic tests for Language
    /// </summary>
    [TestClass]
    [CLSCompliant(false)]
    public class NumberConverterTest : EntityTestBase<IComplexEntityFacade>
    {
        [TestMethod]
        public void TestInNumberToWordsCs()
        {
            var culture = CultureInfo.GetCultureInfo("cs");

            long number;
            string result;

            number = 467815345;
            result = ConversionManager.NumberToWord(number, culture);
            Assert.IsTrue(result.Equals("čtyřistašedesátsedmmilionůosmsetpatnácttisíctřistačtyřicetpět"), result);

            number = 2000132701;
            result = ConversionManager.NumberToWord(number, culture, " ");
            Assert.IsTrue(result.Equals("dvě miliardy jedno sto třicet dva tisíc sedm set jedna"), result);

            number = 102100202999;
            result = ConversionManager.NumberToWord(number, culture, " ");
            Assert.IsTrue(result.Equals("jedno sto dvě miliardy jedno sto milionů dvě stě dva tisíce devět set devadesát devět"), result);

            number = 1002200212;
            result = ConversionManager.NumberToWord(number, culture, " ");
            Assert.IsTrue(result.Equals("jedna miliarda dva miliony dvě stě tisíc dvě stě dvanáct"), result);
        }

        [TestMethod]
        public void TestInNumberToWordsEn()
        {
            var culture = CultureInfo.GetCultureInfo("en");

            long number;
            string result;

            number = 467815345;
            result = ConversionManager.NumberToWord(number, culture);
            Assert.IsTrue(result.Equals("fourhundredsixty-sevenmillioneighthundredfifteenthousandthreehundredforty-five"), result);

            number = 2000132701;
            result = ConversionManager.NumberToWord(number, culture, " ");
            Assert.IsTrue(result.Equals("two billion one hundred thirty-two thousand seven hundred one"), result);

            number = 102100202999;
            result = ConversionManager.NumberToWord(number, culture, " ");
            Assert.IsTrue(result.Equals("one hundred two billion one hundred million two hundred two thousand nine hundred ninety-nine"), result);

            number = 1002200212;
            result = ConversionManager.NumberToWord(number, culture, " ");
            Assert.IsTrue(result.Equals("one billion two million two hundred thousand two hundred twelve"), result);
        }

        #region Additional test attributes
        // constructor
        [ClassInitialize]
        public static void MyClassInitialize(TestContext testContext) { }

        [ClassCleanup]
        public static void MyClassCleanup() { }

        [TestInitialize]
        public override void MyTestInitialize() { base.MyTestInitialize(); }

        [TestCleanup]
        public override void MyTestCleanup() { base.MyTestCleanup(); }
        #endregion Additional test attributes
    }
}

